package sk.isomi.minihr.entities;

import java.util.ArrayList;

public class Manager extends Employee {
	private ArrayList<Employee> employees;
	private Manager boss;

	public Manager(String id, String prefix, String name, String surname, String birthNumber, Double salary, String company) {
		super(id, prefix, name, surname, birthNumber, salary, company);
		employees = new ArrayList<Employee>();
	}

	public Manager(String id, String surname, String birthNumber) {
		super(id, surname, birthNumber);
		employees = new ArrayList<Employee>();
	}

	public ArrayList<Employee> getEmployees() {
		return employees;
	}

	public void setEmployees(ArrayList<Employee> employees) {
		this.employees = employees;
	}

	public Manager getBoss() {
		return boss;
	}

	public void setBoss(Manager boss) {
		this.boss = boss;
	}

	@Override
	protected boolean validateId(String id) throws RuntimeException {
		return id != null && id.matches("M\\d{2}");	
	}

	@Override
	public String toString() {
		return String.format(
				"Manager [getName()=%s, getSurname()=%s, getId()=%s]", getName(), getSurname(), getId());
	}
	
	

}
